﻿using FunArts.EasyDevOps.Shared.Models.Enums;
using FunArts.EasyDevOps.Shared.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FunArts.EasyDevOps.Shared.Models.SshClient.Command
{
    /// <summary>
    /// 环境变量命令
    /// </summary>
    public class EnvCommand : ILinuxCommand
    {
        /// <summary>
        /// 环境变量名
        /// </summary>
        public string EnvName { get; set; }
        public string BuildCommand(SystemVersionTypeEnum systemVersionType)
        {
            if (EnvName.IsNullOrWhiteSpace())
            {
                return "printenv";
            }
            return $"echo ${EnvName}";
        }
    }
}
